/**
 * 健康监测模块接口列表
 */
import base from "../base"; // 导入接口域名列表
import axios from "../../http/axios"; // 导入http中创建的axios实例

const healthMonitor = {
  // 获取实时视频 health_monitoring/queryBridgeCamera?bridgeId=796083194762887168
  getVideo(params){
    return axios.get(`${base.baseUrl}/health_monitoring/queryBridgeCamera`, {params})
  },

   //今日车型超载统计
    countTodayWeightType(params){
        return axios.get(`${base.baseUrl}/traffic/countTodayWeightType`,{params} )
        // return axios.get(`${base.Surl}/traffic/countTodayWeightType?bridgeId=758339779099099136` )
    },
   //今日车型对比
   countTodayType(params){
        return axios.get(`${base.baseUrl}/traffic/countTodayType`,{params} )
        // return axios.get(`${base.Surl}/traffic/countTodayType?bridgeId=758339779099099136` )
    },
  // 今日车辆超限排名
  countTodayAutoWeight(params) {
      return axios.get(`${base.baseUrl}/traffic/countTodayAutoWeight`,{params:params})
      // return axios.get(`${base.Surl}/traffic/countTodayAutoWeight?bridgeId=758339779099099136`)
  },
  //今日车流量对比
  todayTraffic(params) {
    return axios.get(`${base.baseUrl}/health_monitoring/queryTodayTrafficFlowContrast`, { params })
    // return axios.get(`${base.Surl}/health_monitoring/queryTodayTrafficFlowContrast?bridgeId=758339779099099136`)
  },
  //今日车流量对比
  trafficQuantityStatisticsByBridgeId(params) {
    return axios.get(`${base.baseUrl}/traffic_count/trafficQuantityStatisticsByBridgeId`, { params })
    // return axios.get(`${base.Surl}/health_monitoring/queryTodayTrafficFlowContrast?bridgeId=758339779099099136`)
  },
    //超限车次频次
    countAutoWeight(params) {
      return axios.get(`${base.baseUrl}/traffic/countTodayAutoWeight`, { params })
      // return axios.get(`${base.Surl}/traffic/countAutoWeight?bridgeId=758339779099099136`)
    },
  //病害查看
  problemList(params) {
    return axios.get(`${base.inspUrl}/insp/history/problem/list`, { params })
  },
  //技术评定
  queryMaintenanceLevelByBridgeId(params) {
      return axios.get(`${base.baseUrl}/bridge_basic/queryMaintenanceLevelByBridgeId`,{params})
  },
  //巡检次数统计
  distribution(params) {
    return axios.get(`${base.inspUrl}/insp/report/problem/distribution`, { params })
  },

  //实时监测
  queryUpToDateById(params) {
    return axios.get(`${base.baseUrl}/traffic/queryUpToDateById`, {params})
    // return axios.get(`${base.Surl}/traffic/queryUpToDateById?bridgeId=758339779099099136`)
  },
  // YU 重复方法注释
  // //大桥总览列表
  // queryPointNumberByBridgeId(params) {
  //   return axios.get(`${base.baseUrl}/health_monitoring/queryPointNumberByBridgeId`, { params })
  // },
  //历史数据
  page(params) {
    return axios.post(`${base.baseUrl}/traffic/queryVehicleHistoryData`, params)
  },
  //车道号
  allLane(params) {
    return axios.get(`${base.baseUrl}/traffic/findBridgeLane`, {params})
  },
  //获取所有车型
  allAutoCar(params) {
    return axios.get(`${base.baseUrl}/traffic/findBridgeAutoCar`, {params})
  },
  //病害趋势统计
  trend(params) {
    return axios.get(`${base.inspUrl}/insp/report/problem/trend`, { params })
  },
  /***报警列表***/
  //分页查询
  querySensorForPage(params) {
    return axios.post(`${base.baseUrl}/health_monitoring/sensor/query`, params)
  },
  //查询子项
  queryByCodeAndBridgeId(params) {
    return axios.get(`${base.baseUrl}/health_monitoring/sensor/queryByCodeAndBridgeId`, {
      params
    })
  },
  //时间回溯
  dataBack(params) {
    return axios.get(`${base.baseUrl}/health_monitoring/sensor/dataBack`, {
      params
    })
  },
  //批处理
  batchDatas(params) {
    return axios.post(`${base.baseUrl}/health_monitoring/sensor/batch`, params)
  },
  //根据桥梁id查询最近10天养护统计次数
  queryCountByBridgeId(params) {
      return axios.get(`${base.YFurl}/maintenance/bridge/queryCountByBridgeId`,{params})
  },
    //大桥总览列表
    queryPointNumberByBridgeId(params) {
        return axios.get(`${base.baseUrl}/health_monitoring/queryPointNumberByBridgeId`,{params})
    },
    //病害统计10天
    trend10(params){
        return axios.get(`${base.inspUrl}/insp/report/problem/num`,{params} )
    },

    // 根据桥梁id 获取一级分类列表 /system_datatype/queryTypeByBridgeId?bridgeId=760170584528125952
    getFirstTypeList(params = {}){
      return axios.get(`${base.baseUrl}/system_datatype/queryTypeByBridgeId`,{params})
    },
    // 根据一级分类获取二级分类列表 /system_datatype/queryTypeByBridgeIdAndFirstId
    getSecondTypeList(params = {}){
      return axios.post(`${base.baseUrl}/system_datatype/queryTypeByBridgeIdAndFirstId`, params)
    },
    //统计分析
    countTypePointNumber(params){
      return axios.get(`${base.baseUrl}/device_measure_point/countTypePointNumber`, {
        params
      })
    }
};

export default healthMonitor;
